﻿@model IEnumerable<Gfw.Web.Models.Account.BargainEmoneyModel>
@{
    Layout = null;
}
@using Gfw.Web.Common;
@using C.Mvc
@using MvcContrib.UI.Grid;
@using (Ajax.BeginForm("BeQueryList", "UserAccount", null, Gfw.Web.Common.ViewHelper.AjaxGet))
{
    <table id="mytable">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.TradeDate)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.TradeType)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Income)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Outlay)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Balance)
            </th>

            <th>
                @Html.DisplayNameFor(model => model.TradeAbstract)
            </th>

        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.TradeDate)
                </td>
                <td>
                     @Html.Label(item.TradeType.GetDisplaynName(typeof(Gfw.Infrastructure.Account.UserTradeTypeEnum)))
                </td>
                <td style="color:green">
                 
                    @Html.DisplayFor(modelItem => item.Income)
                </td>
                <td style="color:red">
                    @Html.DisplayFor(modelItem => item.Outlay)
                </td>
                 <td style="color:blue">
                    @Html.DisplayFor(modelItem => item.Balance)
                </td>

                <td>
                    @Html.DisplayFor(modelItem => item.TradeAbstract)
                </td>

            </tr>
        }
    </table>
    @Ajax.DataGridPager().Totals(ViewBag.TotalSize).PageIndex(ViewBag.PageIndex).PagePropertyName("page").AjaxOptions(Gfw.Web.Common.ViewHelper.AjaxGet);
}
